﻿using Microsoft.EntityFrameworkCore;

using NationalDay3D.Domain.Interfaces;
using NationalDay3D.Domain.Models;
using NationalDay3D.Infrastruct.Data.Context;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NationalDay3D.Infrastruct.Data.Repository
{
    public class StudentRepository : Repository<Student>, IStudentRepository
    {
        public StudentRepository(StudyContext context)
            : base(context)
        {

        }

        public Student GetByEmail(string email)
        {
            return DbSet.AsNoTracking().FirstOrDefault(c => c.Email == email);
        }
    }
}
